#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>

int main()
{
    const char * filename = "./calFileSize";
    const char * mylink = "linkCal";
#if 0
    /* 软链接 */
    int ret = symlink(filename,link);
    if(ret == -1)
    {
        perror("symlink error:");
        exit(-1);
    }
    printf("create soft link success\n");
#endif
   int ret = link(filename,mylink);
   if(ret == -1)
   {
        perror("link error:\n");
        exit(-1);
   }
   printf("create link success\n");

    return 0;
}